<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<script language="javascript">
		//普通翻页
		function formSubmit(num){
			//document.getElementById('rollpage').page.value = num;
			document.getElementById('rollpage').jump.value = 0;
			document.getElementById('rollpage').action='${webpath}/article/articleList_'+${page_content.articlesleibieID }+'_'+num+'.html';
			document.getElementById("rollpage").submit();
		}
		//一次翻10页
		function formSubmit(num,jump){
			document.getElementById('rollpage').jump.value = jump;
			document.getElementById('rollpage').action='${webpath}/article/articleList_'+${page_content.articlesleibieID }+'_'+num+'.html';
			document.getElementById("rollpage").submit();
		}
</script>
<!--翻页 10页 向前 start-->
<c:choose>
	<c:when test="${page_content.pagecur+1 > 10 }">
		<a href='javascript:formSubmit(${page_content.pagecur-10 },${page_content.init_page-21})'><img src="../images/arrow1.jpg" border="0" width="19" height="18" align="absmiddle"></a>
	</c:when>
	<c:when test="${page_content.pagecur < 11 }">
		<img src="../images/arrow1.jpg" width="19" height="18" align="absmiddle">
	</c:when>
</c:choose>
<!--翻页 10页 向前 end-->

<!--翻页 1页 向前 start-->
<c:choose>
	<c:when test="${page_content.pagecur > 0 }">
		<a href='javascript:formSubmit(${page_content.pagecur-1 })'><img src="../images/arrow2.jpg" border="0" width="18" height="18" align="absmiddle"></a>
	</c:when>
	<c:when test="${page_content.pagecur < 1 }">
		<img src="../images/arrow2.jpg" border="0" width="18" height="18" align="absmiddle">
	</c:when>
</c:choose>
<!--翻页 1页 向前 end-->


	<!--输出页码 start-->
	<script>
		var str="";
		var str_array='${page_content.numbers}';
		var str_array1 = new Array();　
		str_array1=str_array.split(",");
		for(var i=0;i<str_array1.length;i++)
		{
			//因为第一页下标从0开始，所以要把每个值+1
			if(str_array1[i]<10)
			{
				//如果数组中的值大于最后一页的页数，就是最后一了，退出循环
				if(str_array1[i]>${page_content.pages})
				{
					break;
				}
				//如果到了1-10中的10的话，则下次翻页要从11-20，所以多传一个参数，参数为1-10中的启示页1
				if(i==str_array1.length-1)
				{
					str+="<a href='javascript:formSubmit("+str_array1[i]+",${page_content.init_page})'>"+eval(parseInt(str_array1[i])+1)+"</a>&nbsp;";	
				}
				//否则1-10保持不变， 每次值+1
				else
				{
					//当前页 字体加黑
					if(${page_content.pagecur}==str_array1[i])
					{
						str+="<a href='${webpath}/article/articleList_"+${page_content.articlesleibieID }+"_"+str_array1[i]+".html'><b>"+eval(parseInt(str_array1[i])+1)+"</b></a>&nbsp;";
					}
					else
					{
						str+="<a href='${webpath}/article/articleList_"+${page_content.articlesleibieID }+"_"+str_array1[i]+".html'>"+eval(parseInt(str_array1[i])+1)+"</a>&nbsp;";					
					}
				}
			}
			else
			{
				//如果数组中的值大于最后一页的页数，就是最后一了，退出循环
				if(str_array1[i]>${page_content.pages})
				{
					break;
				}
				//如果到了1-10中的10的话，则下次翻页要从11-20，所以多传一个参数，参数为1-10中的启示页1
				if(i==str_array1.length-1)
				{
					str+="<a href='javascript:formSubmit("+str_array1[i]+",${page_content.init_page})'>"+str_array1[i]+"</a>&nbsp;";	
				}
				//否则1-10保持不变， 每次值+1
				else
				{
					//当前页 字体加黑
					if(${page_content.pagecur}==str_array1[i])
					{
						str+="<a href='${webpath}/article/articleList_"+${page_content.articlesleibieID }+"_"+str_array1[i]+".html'><b>"+str_array1[i]+"</b></a>&nbsp;";
					}
					else
					{
						str+="<a href='${webpath}/article/articleList_"+${page_content.articlesleibieID }+"_"+str_array1[i]+".html'>"+str_array1[i]+"</a>&nbsp;";					
					}
				}
			}
		}
		document.write(str);
	</script>
	<!--输出页码 end-->
	

<!--翻页 1页 向后 start-->
<c:choose>
	<c:when test="${page_content.pagecur < page_content.pages}">
		<a href='javascript:formSubmit(${page_content.pagecur+1 })'><img src="../images/arrow4.jpg" width="18" border="0" height="18" align="absmiddle"></a>
	</c:when>
	<c:when test="${page_content.pagecur > page_content.pages-1}">
		<img src="../images/arrow4.jpg" border="0" width="18" height="18" align="absmiddle">
	</c:when>
</c:choose>
<!--翻页 1页 向后 end-->

<!--翻页 10页 向后 start-->
<c:choose>
	<c:when test="${page_content.pagecur+10 < page_content.pages}">
		<a href='javascript:formSubmit(${page_content.pagecur+10 },${page_content.init_page})'><img src="../images/arrow3.jpg" width="19" border="0" height="18" align="absmiddle"></a>
	</c:when>
	<c:when test="${page_content.pagecur+10 > page_content.pages}">
		<img src="../images/arrow3.jpg" width="19" height="18" align="absmiddle">
	</c:when>
</c:choose>
<!--翻页 10页 向后 end-->
&nbsp;共${page_content.pages }页${page_content.counts }条数据。
